TARGET = ./test
ROOT := ../
INCDIR := -I$(ROOT)/include
LIBDIR := -L$(ROOT)/
         
CC :=gcc
LD :=ld

CFLAGS :=   -c  -Wall -g -O $(INCDIR)
LDFLAGS :=  -lpthread  -lncurses  $(LIBDIR)


TESTLDFLAGS := $(LDFLAGS)
SOURCES := $(wildcard *.c)
OBJS   := $(patsubst %.c,%.o,$(SOURCES))

$(TARGET):$(OBJS)
	echo $(OBJS)
	$(CC) $^ $(LDFLAGS) -o $@ 

%.o:    %.c
	$(CC) $< $(CFLAGS) -o $@ 

.PHONY:clean
clean:
	rm -f $(TARGET) *.o *~
